<include file="public/head"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('/plugin/auto_code/admin_index/index')}">配置表单</a></li>
    </ul>
    <!--    <form method="post" class="form-horizontal js-ajax-form margin-top-20"-->
    <!--          action="{:url('/plugin/auto_code/AdminIndex/settingPost')}">-->
    <!--        <div class="form-group">-->
    <!--            <label class="col-sm-2 control-label"><span class="form-required" style="color:red;">*</span> 菜单名称:</label>-->
    <!--            <div class="col-md-6 col-sm-10">-->
    <!--                <input type="text" class="form-control" name="name" value="">-->
    <!--                <p class="help-block">添加后台菜单的名称,生成注释 @adminMenu->name，导入新菜单</p>-->
    <!--            </div>-->
    <!--        </div>-->
    <!--        <div class="form-group">-->
    <!--            <label class="col-sm-2 control-label"><span class="form-required" style="color:red;">*</span> 控制器名:</label>-->
    <!--            <div class="col-md-6 col-sm-10">-->
    <!--                <input type="text" class="form-control" name="controllers" value="">-->
    <!--                <p class="help-block">首字母大写，遵循驼峰命名规则，如Person</p>-->
    <!--            </div>-->
    <!--        </div>-->

    <!--        <div class="form-group">-->
    <!--            <label class="col-sm-2 control-label"> 上级菜单:</label>-->
    <!--            <div class="col-md-6 col-sm-10">-->
    <!--                <select class="form-control" name="category">-->
    <!--                    <option value="">-&#45;&#45; 不生成菜单 -&#45;&#45;</option>-->
    <!--                    {$category}-->
    <!--                </select>-->
    <!--                <p class="help-block">选择上级菜单，不选择则不生成@adminMenu注释</p>-->
    <!--            </div>-->
    <!--        </div>-->

    <!--        <div class="form-group">-->
    <!--            <label class="col-sm-2 control-label"><span class="form-required" style="color:red;">*</span> 数据库表:</label>-->
    <!--            <div class="col-md-6 col-sm-10" style="height:450px;overflow-y: scroll;">-->
    <!--              -->
    <!--            </div>-->
    <!--        </div>-->

    <!--        <div class="col-sm-offset-2 col-sm-10">-->
    <!--            <button type="submit" class="btn btn-primary js-ajax-submit">生成</button>-->
    <!--            <button type="reset" class="btn btn-default">重置</button>-->
    <!--        </div>-->
    <!--    </form>-->
    <table class="table table-bordered table-hover" style="font-size:14px;">
        <thead>
        <tr>
            <th>表名</th>
            <th>名称</th>
            <th>引擎</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="tableArr" id="ta">
            <tr>
                <td>{$ta.table_name}</td>
                <td>{$ta.t_comment}</td>
                <td>{$ta.t_engine}</td>
                <td>
                    <button type="button" class="btn btn-xs btn-success" onclick="openPanel('{$ta.table_name}')">生成代码
                    </button>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script>
    function openPanel(table_name) {
        // layer.open({
        //     type: 2,
        //     content: '{:url("/plugin/auto_code/Auto/autoIndex")}?table_name=' + table_name
        // });

        window.location.href = '{:url("/plugin/auto_code/Auto/autoIndex")}?table_name=' + table_name;
    }
</script>
</body>
</html>